<template>
	<view>
		<view>
			<button type="primary" @click="doit(1,$event)">点我</button>
		</view>
		<view>{{msg}}</view>
		<view>{{age-5>18?"已成年":"未成年"}}</view>
		<view>{{userinfo[0]["name"]}}</view>
		<view>{{userinfo[0].age}}</view>
		<!-- <view>{{num}}</view> -->
		<view>
			<image :src="imgSrc"></image>
		</view>
		<view v-for="item in userinfo">
			名字：{{item.name}}
			年龄：{{item.age}}
		</view>
	</view>
</template>

<script>
	export default {
		onLoad(options) {
			console.log(options)
		},
		data() {
			return {
				msg:"hello uni-app",
				age:22,
				userinfo:[
					{"name":"张三","age":18},
					{"name":"李四","age":25},
					{"name":"王五","age":37}
				],
				imgSrc:"../../static/img/bg1.jpg"
			}
		},
		methods: {
			doit(num,e){
				console.log(num)
				console.log(e)
			}
		}
	}
</script>

<style>

</style>
